import {defineStore} from 'pinia'

export const tokenStore=defineStore({
  id:"mytoken",
  state:()=>({
    token:""
  }),
  actions:{
    setToken(token){ //设置token
        console.log("0000---------------",token)
        this.token=token;
    },
    removeToken(){
      this.token="";
    }
  },
  getters:{
      // token:()=>this.token
  },
  persist: true  // persist: true  持久化配置项
})